<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>改变颜色，宽高</title>
		<style>
			.oy{
				height: 400px;
				width: 400px;
				border:solid #0000FF 5px ;
			}
			.op{
				height: 600px;
				width: 600px;
				border:solid red 5px ;
			}
			.oo{
				height: 60px;
				width: 60px;
				border:solid black 5px ;
			}
		</style>
	</head>
	
	<body>
		<div class="oy" id="oy">
			我是一个好人
		</div>
				<button onclick="gb()">改变</button>
		<script>
			var oy=document.getElementById("oy");
				var gb=function(){
					if(oy.className=="oy"){
					oy.className="op";
					}
					else{
						oy.className="oo";
					}
				}
			
		</script>
	</body>
</html>
